gopls/internal/vulncheck/scan: pass the pattern after "--" - #673
gopls/internal/vulncheck/scan: pass the pattern after "--"#673yusmer96-maker wants to merge 1 commit into
Conversation
…attern RunGovulncheck appends the caller-supplied package pattern to the govulncheck argument vector directly. A pattern beginning with "-" is therefore consumed by govulncheck's flag set instead of being treated as a package pattern. Append an end-of-options separator before the pattern so that it is always positional.
|
This PR (HEAD: ec54c2b) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/tools/+/826964. Important tips:
|
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/826964. |
|
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be Please don’t reply on this GitHub thread. Visit golang.org/cl/826964. |
RunGovulncheck appends the caller-supplied package pattern to the
govulncheck argument vector without an end-of-options separator, so a
pattern beginning with "-" is parsed by govulncheck's flag set rather
than treated as a package pattern.
Appending "--" before the pattern makes it always positional.
Tested with go test ./gopls/internal/vulncheck/... and the -run Vuln
integration test in gopls/internal/test/integration/misc; both pass
with the change applied.